﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;

namespace GreenArrow
{
    class PickerStatus
    {
        public PickerForm form;
        public virtual void MouseDown(MouseEventArgs e) { }
        public virtual void MouseUp(MouseEventArgs e) { }
        public virtual void MouseClick(MouseEventArgs e) { }
        public virtual void MouseMove(MouseEventArgs e) { }
        public virtual void KeyPress(KeyPressEventArgs e) { }
        public void ChangeStatus(PickerStatus newStatus) {
            newStatus.form = form;
            newStatus.Init();
            form.status = newStatus;
        }
        public virtual void Init() { }
        public void Draw(Graphics g, int x1, int y1, int x2, int y2) {
            int left = Math.Min(x1, x2);
            int top = Math.Min(y1, y2);
            int right = Math.Max(x1, x2);
            int bottom = Math.Max(y1, y2);
            int width = right - left;
            int height = bottom - top;
            g.DrawRectangle(Pens.Red, left, top, width, height);
        }
    }
}
